package bishi.kaizi;

import java.util.Scanner;

/**
 * @author: Tangxz
 * @email: 1171702529@qq.com
 * @cate: 2022/03/06 16:02
 */
public class _03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int down=0,up=0;
        int n = sc.nextInt();
        int nowPai = sc.nextInt();
        int nowCJ = 50;
        n--;
        while (n>0){
            n--;
            int nextPai = sc.nextInt();
            if (nextPai>nowPai){
                int tem = nextPai-nowPai;
                int nextCJ = nowPai+100 - tem*10;
                if (nextCJ>nowCJ){
                    up++;
                }else{down++;}
                nowCJ = nextCJ;
                nowPai=nextPai;
            }else if (nextPai==nowPai){
                int nextCJ = 100-nowPai;
                if (nextCJ>nowCJ){
                    up++;
                }else{down++;}
                nowCJ = nextCJ;
                nowPai=nextPai;
            }else{
                int tem = nowPai - nextPai;
                int nextCJ = 100- nowPai - tem*10;
                if (nextCJ>nowCJ){
                    up++;
                }else{down++;}
                nowCJ = nextCJ;
                nowPai=nextPai;
            }
        }
        System.out.println(up+" "+down);
    }
}
